'''测试获取同花顺股票代码'''
import api.thsApi.testThs as api
import ctypes
from ctypes import wintypes,windll
kernel32 = windll.kernel32
FAGE_READWRITE = 0x04
PROCESS_ALL_ACCESS = 0x001F0FFF
VIRTUAL_MEN = (0x1000 | 0x2000)

if __name__ == '__main__':
    ths_process_hwnd = api.ths_prc_hwnd()
    kernel32.ReadProcessMemory(ths_process_hwnd,0,8)
    #argv_address = kernel32.VirtualAllocEx(ths_process_hwnd, 0, 8, VIRTUAL_MEN, FAGE_READWRITE)
    #VirtualAllocEx_func(hProcess, lpAddress, dwSize, PAGE_READWRITE, MEM_COMMIT | MEM_RESERVE)
    #success = ReadProcessMemory(ths_process_hwnd, base_address, ctypes.byref(buffer), size, ctypes.byref(bytes_read))